package com.ming_za.od_updater_sdk;

import com.ming_za.od_updater_sdk.handler.IUpdateHandler;
import com.ming_za.od_updater_sdk.obj.UpdateError;
import com.ming_za.od_updater_sdk.processing.record.IUpdateRecorder;
import com.ming_za.od_updater_sdk.processing.search.IResSearchProcessor;
import com.ming_za.od_updater_sdk.server_api.IUpdaterServer;
import com.ming_za.od_updater_sdk.log.BasisLogger;
import com.ming_za.od_updater_sdk.processing.file.IFileProcessor;
import com.ming_za.od_updater_sdk.transmit.IStreamTransmit;
import com.ming_za.od_updater_sdk.utils.FileUtils;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;

public interface IUpdater {

    String getIp();

    long getLabelId();

    void setLabelId(long labelId);

    IUpdateHandler getUpdateHandler();

    IResSearchProcessor getResSearchProcessor();

    IUpdaterServer getUpdaterServerAPI();

    IStreamTransmit getIStreamTransmit();

    IFileProcessor getFileProcessor();

    FileUtils getFileUtils();

    String getRootDirectory();

    void addUpdateError(UpdateError error);

    void clearUpdateError();

    IUpdateRecorder getUpdateRecorder();

    BasisLogger getLogger();

    String getReqProtocol();

    AtomicInteger getEndUpdateCount();

    Lock getLock();

    Condition getCondition();

    int getUnpublishKey();

    void addEndTask();

    void reducePoolSize();

    void shutdown();

    void awaitUpdateDone() throws InterruptedException;

}
